package com.yuyue.dronesystem.beans;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * PlanItem
 */
public class PlanItem {

    private Long droneId;
    private Encasement encasement;
    private List<RTCoordinate> rtCoorList = new ArrayList<>();

    public PlanItem() {
    }

    public PlanItem(Long droneId, Encasement encasement, List<RTCoordinate> rtCoorList) {
        this.droneId = droneId;
        this.encasement = encasement;
        this.rtCoorList = rtCoorList;
    }

    public Long getDroneId() {
        return this.droneId;
    }

    public void setDroneId(Long droneId) {
        this.droneId = droneId;
    }

    public Encasement getEncasement() {
        return this.encasement;
    }

    public void setEncasement(Encasement encasement) {
        this.encasement = encasement;
    }

    public List<RTCoordinate> getRtCoorList() {
        return this.rtCoorList;
    }

    public void setRtCoorList(List<RTCoordinate> rtCoorList) {
        this.rtCoorList = rtCoorList;
    }

    public PlanItem droneId(Long droneId) {
        this.droneId = droneId;
        return this;
    }

    public PlanItem encasement(Encasement encasement) {
        this.encasement = encasement;
        return this;
    }

    public PlanItem rtCoorList(List<RTCoordinate> rtCoorList) {
        this.rtCoorList = rtCoorList;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof PlanItem)) {
            return false;
        }
        PlanItem planItem = (PlanItem) o;
        return Objects.equals(droneId, planItem.droneId) && Objects.equals(encasement, planItem.encasement) && Objects.equals(rtCoorList, planItem.rtCoorList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(droneId, encasement, rtCoorList);
    }

    @Override
    public String toString() {
        return "{" +
            " droneId='" + getDroneId() + "'" +
            ", encasement='" + getEncasement() + "'" +
            ", rtCoorList='" + getRtCoorList() + "'" +
            "}";
    }
}